1. Field of the Invention
The present invention relates to virtualization, specifically, virtualization support for isochronous Universal Serial Bus (USB) devices.
2. Description of the Related Art
Virtualization is a technique in which a computer system is partitioned into multiple isolated virtual machines (VMs), each of which appears to the software within it to be a complete computer system. The software running within each VM—including the operating system in the VM—may be unaware of any of the other VMs, or even that the computer system is partitioned. The virtual machine monitor (VMM) is responsible for providing the environment in which each VM runs and maintaining isolation between the VMs. FIG. 1 shows an example of a typical virtualized computer system.
Each virtual machine has access to a set of devices, which may be virtual devices or physical devices. These devices include controllers for secondary busses. The VMM controls which physical devices/controllers are assigned to each VM, and also implements the virtual devices are visible to VMs. If a physical device is exclusively assigned to a single virtual machine, it is not available to the other virtual machines. In current practice, if a device needs to be shared by more than one VM, the VMM typically implements a virtual device for each VM, and arbitrates access of the virtual devices to the physical device. The implementation of the virtual devices and the arbitration of access to the physical device adds overhead and reduces the performance of both the computer system and the device. Also, the virtual device typically defines a different more limited interface and functionality than the physical device.
USB 2.0 (Universal Serial Bus Revision 2.0 Specification, published 2002) is an external bus that supports data rates of up to 480 Mbps. USB 2.0 is an extension of USB 1.1 (Universal Serial Bus Revision 1.1 Specification, published 1996) and is fully compatible with USB 1.1. Current virtualization software solutions provide limited support for USB 2.0. For example, existing virtualization software solutions do not support isochronous devices nor do they support more than two devices on USB 2.0 per VM.
In the case of a bus handling communication with multiple devices, such as USB, the VMM may wish to assign individual devices on the bus to specific VMs, to avoid the problems associated with virtualizing the devices. However, the bus controller (in the case of USB, the host controller) is used to communicate with all devices on the bus, so it cannot be assigned to any single VM. The bus controller must be virtualized in a way that allows each VM to use it to communicate with the devices on the bus that are assigned to that VM.
This invention addresses one of the problems that arises in virtualizing USB, which is that each VM incorrectly assumes that it owns the full USB bandwidth, because it is not aware of the other VMs. Hence, bandwidth may be over allocated.